package com.xf.spring.beanscope;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.xf.spring.fitout.Car;

public class Test {

	public static void main(String[] args) {
		ApplicationContext ct = new ClassPathXmlApplicationContext("xmls/beanScope.xml");
		Car c1=(Car) ct.getBean("car1");
		Car c2=(Car) ct.getBean("car1");
		Car c3=(Car) ct.getBean("car2");
		Car c4=(Car) ct.getBean("car2");
		System.out.println(c1==c2);
		System.out.println(c3==c4);
	}

}
